Fix check_checksums when using templates, patch-dicts or checksums.json#5021
Open
Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Open
Fix check_checksums when using templates, patch-dicts or checksums.json#5021Flamefire wants to merge 9 commits intoeasybuilders:developfrom
check_checksums when using templates, patch-dicts or checksums.json#5021Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Conversation
f040c55 to
4f408b7
Compare
In `sources` the keyname is "filename" while in `patches` it is "name".
…st' easyconfig parameter value in EasyBlock.check_checksums" This reverts commit 7112e40.
This requires correctly resolving the templates in `exts_list` sources/patches to be able to fetch them from the JSON file.
4f408b7 to
9d7bdd4
Compare
Contributor
Author
|
@boegel This might be useful to include in the release as it fixes multiple subtle issues in how checksums are handled in the checks. Especially by replacing duplicated logic by A big chunk is just refactoring to avoid duplication, see individual commits. This code is heavily exercised on easyconfigs CI so running a few PR CIs after merging this should discover any hidden issues that the added tests didn't catch. |
…le_info` The returned dict per extension has a 'patches' key but no 'sources'. Add this incoorporating `source_tmpl` or the default value. Add test for that and also for `nosource: True` and `sources` being a list.
9d7bdd4 to
eef8d6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a similar fix as easybuilders/easybuild-easyconfigs#15973
check_checksumshad various shortcomings, some touched by 7112e40 (from @boegel ) which disabled templating entirely when getting theexts_listlist.This breaks when
checksums.jsonis used: It will report missing checksums even when they are available in the checksums.jsonAdditionally templates in the name/version of extension won't be resolved causing the error message harder to understand
A quick fix was to replace the above commit by
allow_unresolved_templates-decorator to allow partially resolved extensions but don't fail as before when templates are used e.g. ininstall_cmdwhich fixes the issues with the name/version of the extensionHowever that resolves too deep as inside the extension options different template values must be used.
We have
collect_exts_file_infowhich does handle all those peculiarities of the extension specs already so just use that.This also handles the default file name of extension sources and
nosourcewhich we can rely on here if it fillssourcescorrectly. This requires #4054 (merged here so that tests pass)It also fixes a failure when patches were specified as dicts as In
sourcesthe keyname is "filename" while inpatchesit is "name" which causes aKeyErrorincheck_checksums_for